package org.walklink.agent.track;

import com.alibaba.ttl.TransmittableThreadLocal;

/**
 * 跟踪上下文
 *
 * @author lidishan
 */
public class TrackContext {
    private static final TransmittableThreadLocal<TraceInfo> TTL = new TransmittableThreadLocal<>();
    public static void clear(){
        TTL.remove();
    }
    public static TraceInfo getTraceInfo(){return TTL.get();}
    public static void setTraceInfo(TraceInfo traceInfo){
        TTL.set(traceInfo);
    }
}
